Issue #863 transport regridding#907
Conversation
# Conflicts: # imod/mf6/model_gwf.py
JoerivanEngelen
left a comment
There was a problem hiding this comment.
I have some suggestions, approving in advance.
| """ | ||
|
|
||
| from copy import deepcopy | ||
| from typing import Tuple |
There was a problem hiding this comment.
Since python 3.10, this is not necessary anymore, and you can use the the regular types tuple, list, str etc. for type annotations. We haven't updated this everywhere in the codebase yet. But this line can be removed
| if hasattr(self,"auxiliary_data_fields"): | ||
| remove_expanded_auxiliary_variables_from_dataset(self) | ||
| for var in self.dataset.data_vars.keys(): | ||
| if self._skip_masking_variable(var, self.dataset[var]): | ||
| masked[var] = self.dataset[var] | ||
| else: | ||
| masked[var] = self._mask_spatial_var(var, mask) | ||
|
|
||
| if hasattr(self,"auxiliary_data_fields"): | ||
| expand_transient_auxiliary_variables(self) |
There was a problem hiding this comment.
Just an idea:
We could create a decorator to encapsulate functions/methods, where necessary, for removing aux vars and expanding them again. As this is also done in _skip_masking_variable, and maybe should be done for regridding/clipping as well? This is probably best done after we have done all tasks in this milestone. If you agree, we can make an issue for this and add it to the refactoring milestone.
| screen_top=[0.0, 0.0], | ||
| screen_bottom=[-1.0, -1.0], | ||
| rate=[1.0, -2.0], | ||
| rate=[0.1, -0.2], |
There was a problem hiding this comment.
Please add a comment how and why we departed from the original mf6 example
There was a problem hiding this comment.
done. note that the fixture did not mention the original mf6 example, so nothing was promised wrt that.
I added a paragraph to explain where the model in the fixture comes from and why it was changed.
review comment Co-authored-by: Joeri van Engelen <joerivanengelen@hotmail.com>
review comment Co-authored-by: Joeri van Engelen <joerivanengelen@hotmail.com>
Fixes #863
Description
transport models now can be regridded,
Checklist
Issue #nr, e.g.Issue #737